import time
from public.action import *
from public.business import *
from public.testData import *
from public.tools import *

testCase="DBshop029_新增普通商品标签"

firefox=openBrowser(urlAdmin)
DBshopLoginAdmin(firefox)
DBshopEnterMenu3(firefox,"商品管理","商品标签","普通商品标签")

firefox.find_element_by_link_text("添加普通商品标签").click()
firefox.find_element_by_xpath("(//select[@id='tag_group_id'])/option[2]").click()
firefox.find_element_by_id("tag_name").send_keys("华为手机，华为耳机")
firefox.find_element_by_xpath("//button").click()

try:
    firefox.find_element_by_xpath("//td[text()='华为老大']")
    writeLog("%s 测试通过"%testCase)
except:
    writeLog("%s 测试失败" % testCase)
    getPhoto(firefox)
